package org.rcy.framework.security.authentication.provider;

import org.rcy.framework.security.form.PasswordAuthenticator;
import org.rcy.framework.security.form.PasswordToken;
import org.rcy.framework.security.principal.UserProvider;


/**
 * @author 吴康桥
 * @Description
 * @date 2022/10/27 11:38
 */


public class PasswordAuthenticationProvider extends FormAuthenticationProvider{
	public PasswordAuthenticationProvider(UserProvider userProvider) {
		super(userProvider);
		this.setFormAuthenticator(new PasswordAuthenticator());
	}

	public boolean supports(Class<?> authentication) {
		return PasswordToken.class.isAssignableFrom(authentication);
	}
}
